- 
                Notifications
    You must be signed in to change notification settings 
- Fork 113
fix(saveObjects-error-msg): refine the error thrown by the method #584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v3
Are you sure you want to change the base?
Conversation
         chloelbn
  
      
      
      commented
      
            chloelbn
  
      
      
      commented
        Sep 9, 2019 
      
    
  
| Q | A | 
|---|---|
| Bug fix? | yes | 
| New feature? | no | 
| BC breaks? | no | 
| Related Issue | Fix #583 | 
| Need Doc update | no | 
        
          
                src/Support/Helpers.php
              
                Outdated
          
        
      | */ | ||
| public static function isIterable($object) | ||
| { | ||
| return is_array($object) || is_object($object) || $object instanceof \Traversable; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain me is_object($object)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to cover the maximum cases where a given variable is foreachable, and objects as arrays don't implement the Traversable interface. cf https://www.php.net/manual/en/class.traversable.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but objects are foreachable if they implement ArrayAccess interface. Correct? They ArrayAccess interface return true on is_array. No ?
7f476f3    to
    6775654      
    Compare
  
    6775654    to
    57dc870      
    Compare
  
    57dc870    to
    3a08a88      
    Compare
  
    | Putting this on hold, waiting for Chloe for this. |